package com.qf.flash.model;

import java.util.ArrayList;
import java.util.List;

/**
 * 创建日期：2020/2/23 on 16:33
 * 描述:
 * 作者:戴旭东
 */
public class RegionBean {
    private boolean isChosen;


    /**
     * id : 421
     * createDate : 2020-02-21 18:51:41
     * name : 长沙
     * type : 1
     * sub : [{"id":"2941","createDate":"","name":"岳麓区","type":"","sub":[]},{"id":"2942","createDate":"","name":"芙蓉区","type":"","sub":[]},{"id":"2943","createDate":"","name":"天心区","type":"","sub":[]},{"id":"2944","createDate":"","name":"开福区","type":"","sub":[]},{"id":"2945","createDate":"","name":"雨花区","type":"","sub":[]},{"id":"2946","createDate":"","name":"浏阳市","type":"","sub":[]},{"id":"2947","createDate":"","name":"长沙县","type":"","sub":[]},{"id":"2948","createDate":"","name":"望城县","type":"","sub":[]},{"id":"2949","createDate":"","name":"宁乡县","type":"","sub":[]}]
     */

    private String id;
    private String createDate;
    private String name;
    private String type;
    private String areaCode;
    private List<RegionBean> sub;
    private String pid;

    public String getPid() {
        return pid == null ? "" : pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public boolean isChosen() {
        return isChosen;
    }

    public void setChosen(boolean chosen) {
        isChosen = chosen;
    }

    public String getId() {
        return id == null ? "" : id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getCreateDate() {
        return createDate == null ? "" : createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public String getName() {
        return name == null ? "" : name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type == null ? "" : type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    public List<RegionBean> getSub() {
        if (sub == null) {
            return new ArrayList<>();
        }
        return sub;
    }

    public void setSub(List<RegionBean> sub) {
        this.sub = sub;
    }
}
